<?php
namespace app\common\model;

class RecycleOrderLongModel extends Model {
	
	protected $table = 'recycle_order_long';
	protected $id = 'id';
	protected $type = array(
		'id' => 'integer',
		'subscriber_id' => 'integer',
		'frequency' => 'integer',
		'action_date' => 'integer',
		'action_time' => 'string',
		'remark' => 'string',
		'liaison_name' => 'string',
		'liaison_phone' => 'string',
		'position_lat' => 'float',
		'position_lng' => 'float',
		'region_province' => 'integer',
		'region_city' => 'integer',
		'region_district' => 'integer',
		'address' => 'string',
		'address_describe' => 'string',
		'status' => 'integer',
		'create_time' => 'integer',
		'cancel_time' => 'integer',
		'cancel_cause' => 'string',
	);
	
	public static $status = array(
		0 => '已取消',
		1 => '正常',
	);
	public function getStatusName() {
		return self::disposeAttr(self::$status, $this->getData('status'));
	}
	
	public static $status_alias = array(
		0 => 'cancel',
		1 => 'process',
	);
	
	public static $frequency = array(
		1 => '每月一次',
		2 => '每周一次',
		3 => '每天一次',
	);
	public function getFrequencyName() {
		return self::disposeAttr(self::$frequency, $this->getData('frequency'));
	}
}